import request from "@/utils/request.js"
export default {
    //生成订单
    createOrder(routeId){
        return request({
            url: `/order/createOrder/${routeId}`,
            method: 'post'
        })
    },
    //查询订单
    getOrder(orderNo){
        return request({
            url: `/order/getOrderByNo/${orderNo}`,
            method: 'get'
        })
    },
    //生成微信支付二维码
    createNative(orderNo){
        return request({
            url: `/order/payLog/createNative/${orderNo}`,
            method: 'get'
        })
    },
    //查询订单支付状态
    queryPayStatus(orderNo){
        return request({
            url: `/order/payLog/queryOrderStatus/${orderNo}`,
            method: 'get'
        })
    },
    //获取订单列表
    getOrderList(){
        return request({
            url: `/order/getOrderList`,
            method: 'get'
        })
    },
    //根据id删除订单
    removeOrderById(id){
        return request({
            url: `/order/deleteById/${id}`,
            method: 'delete'
        })
    }
}